{% load future wenlincms_tags wlcore_tags %}

{% if current_page.has_previous or current_page.has_next %}
    <ul class="am-pagination inner-pagination">
        <li class="page-info am-disabled">
            <span>{{ current_page.number }} / {{ current_page.paginator.num_pages }} 页</span>
        </li>
        {% if current_page.has_previous %}
            <li>
                <a title="上一页" class="pointer"
                   onclick="wlajax('
                           {% nevercache %}{{ request.path }}{% endnevercache %}?{{ page_var }}={{ current_page.previous_page_number }}',
                           'get', '{{ wlajaxid }}', '系统错误，请重试')">
                    <span class="am-icon-angle-left"></span></a>
            </li>
        {% else %}
            <li>
                <a title="偶就是第一页" style="background-color: #fff"><span class="am-icon-angle-left"></span></a>
            </li>
        {% endif %}
        {% if current_page.has_next %}
            <li>
                <a title="下一页" class="pointer"
                   onclick="wlajax('
                           {% nevercache %}{{ request.path }}{% endnevercache %}?{{ page_var }}={{ current_page.next_page_number }}',
                           'get', '{{ wlajaxid }}', '系统错误，请重试')">
                    <span class="am-icon-angle-right"></span></a>
            </li>
        {% else %}
            <li>
                <a title="偶就是最后一页" style="background-color: #fff"><span class="am-icon-angle-right"></span></a>
            </li>
        {% endif %}
    </ul>
{% endif %}
